Integrate mapsend.cc.patch, microseconds-6.patch from Gerhard.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jul 2013 02:18:26 +0000 (02:18 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 23 Jul 2013 02:18:26 +0000 (02:18 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4470 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/csv_util.cc
gpsbabel/mapsend.cc
gpsbabel/util.cc
gpsbabel/vitosmt.cc

index 32d20370d26d90987c372851b820672c8958c611..0adcba66cb373fe0d4f83e06dade0a4b9a05534f 100644 (file)
@@ -1182,7 +1182,7 @@ xcsv_parse_val(const char* s, waypoint* wpt, const field_map_t* fmp,
     int s_len = strlen(s);
     if (s_len < 4) {
       /* less than 1 epochsecond, an unusual case */
-      wpt->SetCreationTime(0,(int) atoi(s));
+      wpt->SetCreationTime(0, atoi(s));
     } else {
       char buff[32];
       int off = s_len - 3;
index f479ec77addcb91116b63758692f4084f49c691b..d6a4b8a51c76a353b7ba94f9dbf94f4b01dd4c57 100644 (file)
@@ -224,7 +224,7 @@ mapsend_track_read(void)
     } else {
       centisecs = 0;
     }
-    wpt_tmp->SetCreationTime(t, 10.0 * centisecs);
+    wpt_tmp->SetCreationTime(t, 10 * centisecs);
 
     track_add_wpt(track_head, wpt_tmp);
   }
index 0a5a57fd8b5653d804efecc275653d7d20f77f69..52cd22c7e4734161e64dbbc78c99414954b60b01 100644 (file)
@@ -925,13 +925,15 @@ month_lookup(const char *m)
  * that interesting to us anyway.
  */
 #define EPOCH_TICKS 621355968000000000.0
-void dotnet_time_to_time_t(double dotnet, time_t *t, int *ms)
+void dotnet_time_to_time_t(double dotnet, time_t *t, int *millisecs)
 {
+  // TODO: replace this with better interface with normal return values
+  // and called via a QDateTime.
   *t = (dotnet - EPOCH_TICKS) / 10000000.;
 #if LATER
   // TODO: work out fractional seconds.
-  if (ms) {
-    *ms = dotnet % 10000;
+  if (millisecs) {
+    *millisecs = dotnet % 10000;
   }
 #endif
 }
index a7d46dcdcfcc5dfc9ff15a1ab6487a1824c3c57d..fe4ea9557a9a3f7a67a313e819ad5cb7ece4e805 100644 (file)
@@ -169,7 +169,7 @@ vitosmt_read(void)
     tmStruct.tm_isdst  =-1;
 
     double usec = fmod(1000000*seconds+0.5,1000000);
-    wpt_tmp->SetCreationTime(mkgmtime(&tmStruct),lround(usec/1000.0));
+    wpt_tmp->SetCreationTime(mkgmtime(&tmStruct), lround(usec/1000.0));
     wpt_tmp->shortname = (char*) xcalloc(16,1);
     snprintf(wpt_tmp->shortname, 15 , "WP%04d", ++serial);